﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.ServiceModel.Web;
using RESTScrum.Dominio;

namespace RESTScrum
{
    [ServiceContract]
    public interface IMateriales
    {
        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "Materiales", ResponseFormat = WebMessageFormat.Json)]
        Material CrearMaterial(Material materialACrear);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Materiales/{codigo}", ResponseFormat = WebMessageFormat.Json)]
        Material ObtenerMaterial(string codigo);

        [OperationContract]
        [WebInvoke(Method = "PUT", UriTemplate = "Materiales", ResponseFormat = WebMessageFormat.Json)]
        Material ModificarMaterial(Material materialAModificar);

        [OperationContract]
        [WebInvoke(Method = "DELETE", UriTemplate = "Materiales/{codigo}", ResponseFormat = WebMessageFormat.Json)]
        void EliminarMaterial(string codigo);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Materiales", ResponseFormat = WebMessageFormat.Json)]
        List<Material> ListarMateriales();
    }
}
